package demo;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
//import org.springframework.context.support.FileSystemXmlApplicationContext;
import service.UserService;

public class UserController {
    public static void main(String[] args) {
        ApplicationContext app = new ClassPathXmlApplicationContext("applicationContext.xml");
       //ApplicationContext app = new FileSystemXmlApplicationContext("D:\\Users\\apple\\IdeaProjects\\Spring\\itheima_spring_ioc\\src\\main\\resources\\applicationContext.xml");
        UserService userService = (UserService) app.getBean("userService");
       // UserService userService = app.getBean(UserService.class);
        userService.save();


    }
}
